from django.contrib import admin
from django.urls import path
from django.views.generic import TemplateView

from z_Userapp.views import *

urlpatterns = [
    path('register/', Register.as_view()),
    path('login/', Login.as_view()),
    path('user/', UserView.as_view()),
    path('detailuser/', DetailUserView.as_view()),
    path('showuser/', ShowUserView.as_view()),
    path('updateuser/', UpdateUserView.as_view()),
    path('getjob/', GetJob.as_view()),

    # 获取中间件结果
    path('middle/', MiddleView.as_view()),
    # 钉钉三方登录
    path('ding_back/',ding_back),
    # 码云三方登录
    path('git/',Gitee.as_view()),
    path('git_back/',GiteeBack.as_view()),
    # 工单分类
    path('workorder/',WorkOrderView.as_view()),
    # 下拉框
    path('smallworkorder/',Small_WorkOrderView.as_view()),
    # 获取MongoDB数据
    path('getmongo/',GetMongo.as_view()),
    # 提交工单信息和查询详情
    path('storage/',StorageView.as_view()),
    # 七牛云
    path('uptoken/',UpTokenView.as_view()),
    # 又拍云
    path('uploadfile/',UploadFile.as_view()),
    # 审核
    path('check/',CheckView.as_view()),
    # 消息盒子
    path('message/',MessageView.as_view()),
    # 聊天
    path('chat/',ChatView.as_view()),

    #websocket
    # path('socket_test',TemplateView.as_view(template_name='md_admin/socket.html')),
    # path('websocket_test',TemplateView.as_view(template_name='md_admin/socket_push.html')),
    path('test_socket/',test_socket),
    path('test_websocket/',test_websocket),

    # 发送消息
    path('service/<str:reception>/<str:send>/',service),
    # 添加消息
    path('addmessage/',AddMessageView.as_view()),

]
